package Demo8;

public class Rect extends Shape{
    private double width;
    private double length;
    Rect (double width,double length){
        this.width = width;
        this.length = length;
    }
    public void draw(){
        System.out.println("矩形: lengrh="+length+"width="+width);
    }
    @Override
    public void calArea(){
        area =length * width;
    }
}
